<template>
  <tbody>
    <tr v-for="item in list" :key="item.id">
      <td>
        <slot name="id" :id="item.id">{{ item.id }}</slot>
      </td>
      <td>
        <slot name="name" :name1="item.name"></slot>
      </td>
      <!-- 如果价格超过100，就有red这个类 -->
      <td class="red"><slot name="price" :price="item.price"></slot></td>
      <td><slot name="time" :time="item.time | time"></slot></td>
      <td>
        <slot name="operation"><a href="#">删除</a></slot>
      </td>
    </tr>
  </tbody>
</template>

<script>
export default {
  data () {
    return {}
  },
  props: {
    list: {
      type: Array,
      required: true
    }
  },

  created () {},

  methods: {}
}
</script>

<style scoped lang="less"></style>
